<?php

/**
 * @author Ned
 *
 */
class Com_Basil_HBase_Data_Row {
    /**
     * @var String Unique key
     */
    public $key;
    
    
    /**
     * @var Array of Com_Basil_HBase_Data_Column
     */
    public $columns;
    
    /**
     * if not null, passing checkOption for check and put operation
     * @var Com_Basil_HBase_Data_Column
     */
    public $checkOption;
    

    public function __construct($key, $cols, $checkOption = null) {
    	$this->key = $key;
    	$this->columns = $cols;
    	$this->checkOption = $checkOption;
    }
    
    public function toMap() {
    	$ret = array();
    	foreach($this->columns as $col) {
    		$ret[$col->columnName] = $col->data;    		
    	}
    	return $ret;
    }
}
?>